<%@ page language="java" contentType="text/html; charset=UTF-8"	pageEncoding="UTF-8"
%><%@ page import="com.mig.coins.html.CommonHTML"
%><%@ page import="com.mig.coins.domain.GestionContable"
%><%@ page import="com.mig.coins.domain.Helper"
%><%@ page import="com.mig.coins.domain.Common"
%><%@ page import="com.mig.coins.domain.MySessionData"
%><%
	//Calcula el trimestre actual
	String desde = Helper.getInicioTrimestreActual();
	String hasta = Helper.getFinalTrimestreActual();

	// Datos de la sesion
	String path = request.getContextPath();
	MySessionData ses = new MySessionData(request);
	long idSocio = ses.getIdSocioGestion();

	String[] js = {"monedas.js", 
			"ajaxRequest.js",
			"calendar.js",
			"contabilidad.js"};
%><!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<%=Common.buildHead("Saldo Contable (Socio)", path, js) %>

<body onload="inicializaDatos('<%=path%>', 0)">

<%=Common.buildMenu(Common.MENU_CONTABILIDAD, path, ses) %>

		<div id="wrapper">
			<div id="page">
				<div id="content">
					<div class="seccion">
						<%=CommonHTML.buildSectionTitle(null, "Saldo Contable") %>
<div class="entry" id="filtro">
	<form name="myForm">
		<table width='100%'>
			<tr>
				<td width='5%'>Desde:</td>
				<td width='12%'><input type="text" id="fechaDesde" size="10"></td>
				<td width='5%'><a href="javascript:muestrCalendario('fechaDesde');"><img src="<%=path%>/images/b_calendario.png" width='16' height='16'></a></td>
				<td width='5%'>Hasta:</td>
				<td width='12%'><input type="text" id="fechaHasta" size="10"></td>
				<td width='5%'><a href="javascript:muestrCalendario('fechaHasta');"><img src="<%=path%>/images/b_calendario.png" width='16' height='16'></a></td>
				<td align='right'><a href="javascript:filtrar();"><img src="<%=path%>/images/b_filtrar.png"></td>
			</tr>
		</table>
	</form>
	<script type="text/javascript">
		document.getElementById('fechaDesde').value='<%=desde%>';
		document.getElementById('fechaHasta').value='<%=hasta%>';
	</script>
	<br/>
</div>
<div class="entry" id="tablaSaldo">
	<%=GestionContable.getSaldoContable(desde, hasta, path, idSocio)%>
</div>
<div class="entry" id="tablaFuturas">
	<%=GestionContable.getSaldoFuturas(path, idSocio)%>
</div>
<div class="entry" id="monedas">
</div>
					</div> <!-- post -->
				</div><!-- content --> 

<%=GestionContable.buildMenu(GestionContable.MENU_SOCIO_SALDO, idSocio, path)%>

				<div style="clear: both;">&nbsp;</div>
			</div> <!-- Page -->
		</div> <!-- wrapper -->
		<%=CommonHTML.buildFooter() %>
	</body>
</html>
